const book = {
	state: {
		fileName: undefined,
		menuVisble: false,
		settingVisible: -1 , // -1 不显示；0.字号； 1.主题，2.进度 3.目录
		defaultFontSize: 16 , // 默认字体大小
		defaultFontFamily: 'Default', // 默认字体
		defaultTheme: undefined,
		fontFamilyVisible: false , // 字体弹窗是否显示
		currentBook: null, // 当前图书对象,
		progress: 0, // 图书进度条 
		bookAvailable: false, // 图示是否解析完成
		section: undefined, // 当前的图书章节
		coverUrl: undefined, // 电子书封面图片路径
		metaData: {}, // 电子书基础信息（标题，作者...）
		navigation: [], // 电子书章节信息 （扁平化结构）
		offsetY: 0, // 电子书下拉Y轴偏移距离 (为了书签功能)
		isBookMark: false, // 是否为书签
	},
	getters:{
		
	},
	mutations:{
		SET_FileName(state,payload) {
			state.fileName = payload.fileName
		},
		SET_MenuVisble(state,payload) {
			state.menuVisble = payload.menuVisble
		},
		SET_SettingVisible(state,payload) {
			state.settingVisible = payload.settingVisible
		},
		SET_DefaultFontSize(state,payload) {
			state.defaultFontSize = payload.defaultFontSize
		},
		SET_CurrentBook(state,payload) {
			state.currentBook = payload.currentBook
		},
		SET_DefaultFontFamily(state,payload) {
			state.defaultFontFamily = payload.defaultFontFamily
		},
		SET_DefaultDefaultTheme(state,payload) {
			state.defaultTheme = payload.defaultTheme
		},
		SET_FontFamilyVisible(state,payload) {
			state.fontFamilyVisible = payload.fontFamilyVisible
		},
		SET_Progress(state,payload) {
			state.progress = payload.progress
		},
		SET_BookAvailable(state,payload) {
			state.bookAvailable = payload.bookAvailable
		},
		SET_Section(state,payload) {
			state.section = payload.section
		},
		SET_CoverUrl(state,payload) {
			state.coverUrl = payload.coverUrl
		},
		SET_MetaData(state,payload) {
			state.metaData = payload.metaData
		},
		SET_Navigation(state,payload) {
			state.navigation = payload.navigation
		},
		SET_OffsetY(state,payload) {
			state.offsetY = payload.offsetY
		},
		SET_IsBookMark(state,payload) {
			state.isBookMark = payload.isBookMark
		},
		
	}
}

export default book